#pragma once

#include "GetEphemInterface.h"
//#include "Body.h"

class IForceInterface
{
public:
	virtual bool Force(int nv, double time, double *x, double *f) = 0;
};

class ISimpleIntegratorInterface
{
public:
	virtual bool SimpleMove(double start, double end, SBody &body) = 0;
};

class IIntegratorInterface
{
public:
	virtual bool Move(double tStart, double tEnd, double *x, double *v, IForceInterface *pForce) = 0;
};

class CIntergator
{
public:
	enum WorkType
	{
		eEverhard,
		eLeapFrog,
	};

	CIntergator(WorkType eType);
	bool Move(double tStart, double tEnd, double *x, double *v, IForceInterface *pForce);
	bool MoveTR(double tStart, double tEnd, double *x, double *v, IForceInterface *pForce);
protected:
	auto_ptr<IIntegratorInterface> m_pImpl;
	int			m_nVarCount;
};

